<template>
<el-col :span="24">
  <el-row>
    <el-col><div class="grid-content bg-purple-dark">
      <el-col :span="6">
        <el-input v-model="filters[0].value" placeholder="search to try"></el-input>
      </el-col>
      <data-tables :data="data" :filters="filters">
        <el-table-column v-for="title in titles" :prop="title.prop" :label="title.label" :key="title.prop"  sortable="custom" :show-overflow-tooltip="true">
        </el-table-column>
      </data-tables>
      </div></el-col>
  </el-row>
</el-col>



</template>


<script>
import { getsedlog } from '@/api/query'
export default {
  data() {
    return {
      data: [
        { name: '数据加载，请稍等'},
      ],
      titles: [{
        prop: 'name',
        label: '发送人'
      },{
        prop: 'data',
        label: '内容'
      },{
        prop: 'status',
        label: '是否成功'
      },{
        prop: 'datetime',
        label: '时间'
      }
      ],
      filters: [
        {
          prop: ['name', 'data','status','datetime'],
          value: '',      
        }
      ]
    }
  },
// mounted() {
//     window.addEventListener('load', () => { 
//           if (this.$route.path !== '/') {
//                 this.$router.replace('/')
//           }
//     })
// },
  methods: {
    GetSendLog() {
      getsedlog().then(response => {
        console.log(response.data)
        this.data = response.data
      })
    },
  },
  created() {    
    this.GetSendLog()  
    // this.$axios.get("/sun/api/vue_https_check")
    // .then(res => {
    //   console.log(res.data.ret);
 
    //   this.data = res.data.ret
    // })
    // .catch(error => {
    //   console.log(error);
    // })
  },
}
</script>

<style>
 .el-tooltip__popper{max-width:25%}
</style>